package org.gbis.openbus.db;

import org.gbis.openbus.Item;
import org.gbis.openbus.RouteStation;
import org.gbis.openbus.SearchResult;

import com.sbmoon.db.QueryResult;

public class DbManagerRouteStation extends DbManager {

	@Override
	public String getSqlFileName() {
		return "sql700_routeStation.sql";
	}

	@Override
	public Item getItem(QueryResult qr) {
		RouteStation findPath = new RouteStation();

//		findPath.setRouteId( qr.getString("routeId"));
//		findPath.setRouteName( qr.getString("routeName"));
//		findPath.setRouteType( qr.getString("routeType"));
		findPath.setStationId( qr.getString("stationId"));
		findPath.setStationName( qr.getString("stationName"));
		findPath.setX( qr.getDouble("x"));
		findPath.setY( qr.getDouble("y"));

		return findPath;
	}

	private DbManagerRouteStation() {
	}

	public static DbManagerRouteStation getDbManager() {
		if( true ) {
			return  new DbManagerRouteStation();
		}
		return dbManager;
	}

	private static final DbManagerRouteStation dbManager = new DbManagerRouteStation();

	public static void main(String[] args) throws Exception {

		SearchResult searchResult = SearchResult.getNewSearchResult();

		getDbManager().getSearchResult( true, searchResult , 200000069 , 75, 77, 200000098, 24, 35 );

	}

}
